package cn.hznc.controller.toolAnalyze;

import cn.hznc.controller.service.toolAnalyze.ToolConsumptionandUsageAnalysisService;
import cn.hznc.controller.service.toolAnalyze.WarehouseUsageAnalyzeService;
import cn.hznc.domain.entity.ToolConsumptionandUsageAnalysisEntity;
import cn.hznc.domain.entity.WarehouseUsageAnalyzeEntity;
import cn.hznc.domain.request.toolAnalyze.ToolConsumptionandUsageAnalysisReq;
import cn.hznc.domain.request.toolAnalyze.WarehouseUsageAnalyzeReq;
import cn.hznc.domain.response.PageResult;
import cn.hznc.domain.response.ResponseBody;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@CrossOrigin(origins = "*", maxAge = 3600)
@RequestMapping("/warehouseUsageAnalyze")
public class WarehouseUsageAnalyzeController {
    @Resource
    private WarehouseUsageAnalyzeService warehouseUsageAnalyzeService;

    @RequestMapping(value = "/queryWarehouseUsageAnalyze", method = RequestMethod.POST)
    public ResponseBody<PageResult<WarehouseUsageAnalyzeEntity>> queryWarehouseUsageAnalyze(@RequestBody WarehouseUsageAnalyzeReq warehouseUsageAnalyzeReq) {
        return ResponseBody.success(warehouseUsageAnalyzeService.queryWarehouseUsageAnalyze(warehouseUsageAnalyzeReq));
    }
}
